When a newly created machining program is executed by an NC machine tool, if command data of the machining program contains mistakes, there occurs a situation where an unexpected movement is made and proper machining becomes impossible due to interference between a tool and a work or a machine. Accordingly, when a machining program is applied to machining for the first time, before actual machining, the program is checked and it is confirmed that no mistakes have been made in a format and a tool path.
Examples of program mistakes that are generally and frequently made during manual programming are a decimal point input omission, a decimal point position mistake, excessive largeness/excessive smallness of an input value, an input omission of an item that should be specified, and the like. These mistakes ascribable to input mistakes are easily made, but it is difficult to visually find them. With a program check method that has conventionally been used in order to find these program mistakes, there are performed a visual check of data and a format of a machining program displayed on a display device attached to an NC device, a syntax check through typical analysis using a decoding means in an NC device, a visual check of whether a desired path is drawn by displaying a tool path, a check of whether a program end point reaches a predetermined position, and the like.
When an operator of an NC machine tool performs a check of every input mistake made during programming with the conventional method, this places a heavy mental load on the operator. Also, in particular, when an operator checks his/her inputted program by himself/herself, it is difficult to completely find program mistakes.
Further, the checks other than the visual check by the operator of the data or the format of the machining program displayed on the display device attached to the NC device are performed after the generation of the machining program is completed and the machining program is analyzed by the NC device. That is, the conventional NC device is not provided with a function of performing an error check by the NC device itself during the generation of the machining program or performing an error check before the completed machining program is analyzed.
It should be noted here that although slightly differing from the problems described above, a technique of solving similar problems is disclosed in JP 62-226310 A. In this patent document, there is disclosed a technique with which it is checked whether an error (omission of data, simultaneous setting, inversion of the upper limit and the lower limit of a limit value, or too-much-close state) is contained in data setting contents for regulating a profiling operation method and an operation range in profiling control, and a message corresponding to the error detected as a result of this check is displayed. With this technique, however, the validity of an input value itself, that is, whether the input value estranges from a value that should be originally commanded is not checked.
Further, JP 11-85256 A discloses a technique with which the kinds, the numbers of times of occurrence, the occurrence dates and times, the occurrence screens, and the occurrence console modes of error messages issued at the time of operation mistakes are displayed through the monitoring and control of a power system performed using a console and a CRT screen of a computer system, thereby allowing an operator to grasp the tendency of operation mistakes to be made by human beings and to prevent the operation mistakes. However, the contents of this technique relate to the monitoring and control of the power system and does not relate to a machining program generating apparatus to which the present invention relates. In addition, with this technique, there are not performed the displaying of caution messages concerning errors in the descending order of the numbers of times of occurrence of warnings and the graphical displaying of the numbers of times of occurrence of the warnings.